package com.hermes.biz.service.item.impl;

import java.util.List;

import com.hermes.biz.common.model.item.ItemDO;
import com.hermes.biz.common.model.result.ItemResultDO;
import com.hermes.biz.manager.item.ItemOperateManager;
import com.hermes.biz.service.item.ItemService;

/**
 * 
 * @author
 *
 */
public class ItemServiceImpl implements ItemService {

	private ItemOperateManager itemOperateManager ;
	
	/**
	 * 
	 * 
	 */
	public List<ItemDO> getAllItemList(long start , long end) {

		return this.itemOperateManager.getAllItemList( start , end);
	}

	/**
	 *
	 */
	public ItemResultDO getSingleItemByItemName(String itemName) {

		return this.itemOperateManager.getSingleItemByItemName(itemName);
	}

	/**
	 * 
	 */
	public ItemResultDO getSingleItemByItemId(long itemId) {

		return this.itemOperateManager.getSingleItemByItemId(itemId);
	}

	public void saveSingleItem(ItemDO itemDO) {
		
		 this.itemOperateManager.saveSingleItem(itemDO);
	}

	public void deleteSingleItemByItemId(long itemId) {

		 this.itemOperateManager.deleteSingleItemByItemId(itemId);
		
	}

	public void updateSingleItem(ItemDO itemDO) {

		 this.itemOperateManager.updateSingleItem(itemDO);
		
	}

	public void updateSingleItemLovedNumber(ItemDO itemDO) {

		 this.itemOperateManager.updateSingleItemLovedNumber(itemDO);
		
	}

	public void updateSingleItemClickNumber(ItemDO itemDO) {

		 this.itemOperateManager.updateSingleItemClickNumber(itemDO);
		
	}
	
	public List<ItemDO> getItemByItemTagId(long tagId,long start , long end) {

		List<ItemDO> resultList = this.itemOperateManager.getItemByItemTagId(tagId, start, end);
		
		return resultList;
	}


	public ItemOperateManager getItemOperateManager() {
		return itemOperateManager;
	}

	public void setItemOperateManager(ItemOperateManager itemOperateManager) {
		this.itemOperateManager = itemOperateManager;
	}

	public long countItemNumber(long tagId) {
		return this.itemOperateManager.countItemNumber(tagId);
	}

	public long countIndexPageItemNumber() {
		return this.itemOperateManager.countIndexPageItemNumber();
	}

}
